package com.foreveross.taskservice.application.impl.convert;

import java.util.List;

import org.springframework.beans.BeanUtils;

import com.foreveross.taskservice.common.model.airfreight.AirFreightChannelModel;
import com.foreveross.taskservice.core.domain.channel.GradChannelEntity;
import com.google.common.collect.Lists;

/**
 * 航空渠道兑换器
 * @author Administrator
 *
 */
public class AirFreightChannelConvert {

	public static AirFreightChannelModel convert(GradChannelEntity entity){
		AirFreightChannelModel model=new AirFreightChannelModel();
		BeanUtils.copyProperties(entity, model);
		return model;
	}
	
	public static List<AirFreightChannelModel> convert(List<GradChannelEntity> entitys){
		List<AirFreightChannelModel> result=Lists.newArrayList();
		for(GradChannelEntity e:entitys){
			result.add(convert(e));
		}
		return result;
	}
	
}
